package org.alanlau.life;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试类
 *
 * @author alan
 * @version 1.0
 * @date 2020/1/12 9:30
 */
public class TestLife {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        System.out.println("获得对象前");
        BeanLife beanLife = (BeanLife) context.getBean("beanLife");
        System.out.println("获得对象后" + beanLife);
        context.close();
    }
}
